Abort compile tasks and associated subprocesses when a client disconnects - #2761
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2761 +/- ##
==========================================
- Coverage 74.18% 74.15% -0.03%
==========================================
Files 71 71
Lines 40491 40537 +46
==========================================
+ Hits 30037 30062 +25
- Misses 10454 10475 +21 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lkwilson
pushed a commit
to lkwilson/red
that referenced
this pull request
Jul 30, 2026
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [mozilla/sccache](https://github.com/mozilla/sccache) | minor | `0.16.0` → `0.17.0` | --- ### Release Notes <details> <summary>mozilla/sccache (mozilla/sccache)</summary> ### [`v0.17.0`](https://github.com/mozilla/sccache/releases/tag/v0.17.0) [Compare Source](mozilla/sccache@v0.16.0...v0.17.0) ##### sccache 0.17.0 ##### Summary sccache 0.17.0 is a significant release: it introduces a **new client-side architecture**. Until now, every compilation was handed off to the long-lived sccache server, which did the cache lookup and ran the compiler. In client-side mode, the client process does that work itself - the server is only consulted for the shared state it owns (compiler info, dist client, stats). This removes a round-trip and the server-side bottleneck, and gives noticeably better results on developer workstations. Client-side mode is opt-in for now: enable it with the `SCCACHE_CLIENT_SIDE` environment variable (or the `client_side_mode` config key). See [docs/Architecture.md](https://github.com/mozilla/sccache/blob/main/docs/Architecture.md#client-side-mode-sccache_client_side) for the details. Other highlights: - **Response files**: gcc/clang builds using quoted `@response` files are now cached and distributed correctly ([#​2755](mozilla/sccache#2755), [#​2772](mozilla/sccache#2772)), and Rust `@argfile` arguments are supported ([#​2782](mozilla/sccache#2782)). - **Distributed compilation**: compile tasks and their subprocesses are now aborted when a client disconnects, instead of running to completion on the build server ([#​2761](mozilla/sccache#2761), [#​2774](mozilla/sccache#2774)). The `ToolchainPackager` cfg gate was fixed so the dist code builds on ppc64le and s390x ([#​2749](mozilla/sccache#2749)). - **S3 SSE-KMS**: server-side encryption with KMS keys is now supported ([#​2770](mozilla/sccache#2770)). - **Diagnostics**: gcc color diagnostics now behave the same way as rustc's ([#​2758](mozilla/sccache#2758)). - **Preprocessor correctness**: `-ivfsoverlay` is treated as a preprocessor-only argument ([#​2767](mozilla/sccache#2767)). Welcome to 4 new contributors! ##### Client-side mode - Initial client-side implementation by [@​glandium](https://github.com/glandium) in [#​2735](mozilla/sccache#2735) - doc: document client-side and direct modes in Architecture.md by [@​sylvestre](https://github.com/sylvestre) in [#​2752](mozilla/sccache#2752) ##### Features - gcc/clang: cache and distribute builds using quoted [@​response](https://github.com/response) files by [@​avikivity](https://github.com/avikivity) in [#​2755](mozilla/sccache#2755) - Add support for arg files in Rust by [@​ranger-ross](https://github.com/ranger-ross) in [#​2782](mozilla/sccache#2782) - feat: support S3 SSE-KMS by [@​jpadilla](https://github.com/jpadilla) in [#​2770](mozilla/sccache#2770) - Make gcc diagnostics color output work the same as for rustc by [@​jwidauer](https://github.com/jwidauer) in [#​2758](mozilla/sccache#2758) - Abort compile tasks and associated subprocesses when a client disconnects by [@​trxcllnt](https://github.com/trxcllnt) in [#​2761](mozilla/sccache#2761) ##### Fixes - Fix ToolchainPackager cfg gate to build on ppc64le/s390x by [@​cryptomilk](https://github.com/cryptomilk) in [#​2749](mozilla/sccache#2749) - treat -ivfsoverlay as a preprocessor-only argument by [@​glandium](https://github.com/glandium) in [#​2767](mozilla/sccache#2767) - gcc: refine response-file tokenizer visibility and whitespace handling by [@​sylvestre](https://github.com/sylvestre) in [#​2772](mozilla/sccache#2772) - Fix description of Unix socket-based Redis connection by [@​Toorero](https://github.com/Toorero) in [#​2769](mozilla/sccache#2769) ##### Cleanup - Simplify the code from pr [#​2761](mozilla/sccache#2761) by [@​sylvestre](https://github.com/sylvestre) in [#​2774](mozilla/sccache#2774) - tests: pin libc in the dist test crate by [@​sylvestre](https://github.com/sylvestre) in [#​2784](mozilla/sccache#2784) - Release 0.17.0 by [@​sylvestre](https://github.com/sylvestre) in [#​2783](mozilla/sccache#2783) ##### New Contributors - [@​jwidauer](https://github.com/jwidauer) made their first contribution in [#​2758](mozilla/sccache#2758) - [@​jpadilla](https://github.com/jpadilla) made their first contribution in [#​2770](mozilla/sccache#2770) - [@​ranger-ross](https://github.com/ranger-ross) made their first contribution in [#​2782](mozilla/sccache#2782) - [@​Toorero](https://github.com/Toorero) made their first contribution in [#​2769](mozilla/sccache#2769) **Full Changelog**: <mozilla/sccache@v0.16.0...v0.17.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTYuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: Renovate Bot <renovate@endsy.me> Reviewed-on: https://gitea.endsy.me/op/red/pulls/24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If an sccache client disconnects from the server before the request completes, abort the tokio tasks spawned to handle the request. Uses
tokio::process::Command::kill_on_drop()to ensure the task's pending subprocesses are also killed.I've added an extra level of nesting and allowed
clippy::redundant_async_blockto aid in review, otherwise the diff is dominated by whitespace changes related to un-indenting the body ofstart_compile_task. I can push a new commit with the redundant async block removed once this PR is approved.Fixes #2759